import Cart from "@/views/Home/cart.vue";
import Cla from "@/views/Home/cla.vue";
import Home from "@/views/Home/home.vue";
import Index from "@/views/Home/index.vue";
import My from "@/views/Home/my.vue";
import { createRouter, createWebHistory } from "vue-router";
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: "/", redirect: "/home/index" },
    {
      path: "/home",
      component: Home,
      children: [
        {
          path: "index",
          component: Index,
        },
        {
          path: "cla",
          component: Cla,
        },
        {
          path: "cart",
          component: Cart,
        },
        {
          path: "my",
          component: My,
        },
      ],
    },
  ],
});

export default router;
